from django.db import models

# Create your models here.

class Question(models.Model):
    question_text = models.CharField(max_length=200)
    release_time = models.DateTimeField()

    def __str__(self):
        return "问题：%s"%self.question_text
    
    

class Choice(models.Model):
    choice_text = models.CharField(max_length=200)
    vote = models.IntegerField(default=0)
    question = models.ForeignKey(Question)

    def __str__(self):
        return "%s:%s"%(self.question,self.choice_text)
    